package com.quanyan.assets.mapper;

import com.quanyan.assets.entity.TbUserEggsAccumulateHistory;
import com.quanyan.assets.entity.TbUserEggsAccumulateHistoryExample;
import java.util.List;
import java.util.Map;

import com.quanyan.assets.request.ReqAdminAddEggsQuery;
import com.quanyan.assets.request.ReqUnfreeze;
import com.quanyan.assets.request.ReqUserAccumulateHistory;
import com.quanyan.assets.response.RespAdminAddEggs;
import com.quanyan.assets.response.RespUserAccumulateHistory;
import org.apache.ibatis.annotations.Param;

public interface ETbUserEggsAccumulateHistoryMapper {

    List<RespUserAccumulateHistory> getUserEggsAccumulateHistory(ReqUserAccumulateHistory reqUserAccumulateHistory);

    int countUseToday(@Param("uid") Integer uid,@Param("systemCode") String systemCode,@Param("businessCode") String businessCode);

    RespUserAccumulateHistory selectByIdAndUid(@Param("uid") Integer uid,@Param("id") Integer id);

    int updateStatus(@Param("systemCode") String systemCode,@Param("businessCode") String businessCode,@Param("serialNumber") String serialNumber,@Param("updateStatus") byte updateStatus,@Param("status") byte status);

    int updateAccumulateHistory(@Param("businessCode") String businessCode,@Param("serialNumber") String serialNumber,@Param("accumulate") Long accumulate);

    void insertAccumulateHistory(TbUserEggsAccumulateHistory tbUserEggsAccumulateHistory);

    int updateRefundSubmit(@Param("systemCode") String systemCode,@Param("businessCode") String businessCode,@Param("businessNo") String businessNo,@Param("accumulate") Long accumulate);

    int updateFreezeStatus(ReqUnfreeze reqUnfreeze);

    int updateRefundComplate(@Param("systemCode")String systemCode,@Param("businessCode") String businessCode,@Param("businessNo") String businessNo,@Param("accumulate") Long accumulate,@Param("status") Byte status);

    int selectMaxBatchNo();

    List<RespAdminAddEggs> getAdminAddEggs(ReqAdminAddEggsQuery reqAdminAddEggsQuery);

    void batchAdd(List<TbUserEggsAccumulateHistory> tbUserEggsAccumulateHistoryList);

    int countUserEggsAccumulateHistory(ReqUserAccumulateHistory reqUserAccumulateHistory);

    Long getSumAccumulate(ReqUserAccumulateHistory reqUserAccumulateHistory);

    List<TbUserEggsAccumulateHistory> selectRepairPhoneNickName();

    void repairPhoneNickName(TbUserEggsAccumulateHistory updateTbUserEggsAccumulateHistory);
}